<!DOCTYPE HTML>
<html>
<head>
    <meta charset="UTF-8">
    <meta name="viewport"
          content="maximum-scale=1.0, minimum-scale=1.0, user-scalable=0, initial-scale=1.0, width=device-width"/>
    <meta name="format-detection" content="telephone=no, email=no, date=no, address=no">
    <title>WinA</title>
    <link rel="stylesheet" type="text/css" href="css/api.css"/>
    <link rel="stylesheet" type="text/css" href="css/box.css"/>
    <script type="text/javascript" src="script/public.js"></script>
    <style>
    	p{
    		color:#999;
    		padding:5px;
    	}

    </style>
    <script type="text/javascript">
		var PickerViewLib = null;
		apiready = function(){

	    	PickerViewLib = api.require('naxiangadressselect');
	    }

		function openNaXiangCityActivity(){
                var mData={
                    shadowColor:0.2,
                    maskswitch:false,
                    padding:1.5,
                    textSize:18,
                    mTitleSize:20,
                    titleText:'城市选择',
                    cancel:'取消',
                    sure:'确定',
                    titlecolor:'#000000',
                    submitcolor:'#1919FF',
                    cancelcolor:'#1919FF',
                    titlebgcolor:'#F5F5F5',
                    bgcolor:'#FFFFFF',
                    dividercolor:'#000000',
                    textcolorcenter:'#000000'
                 }
	        PickerViewLib.openNaxiangCity(mData,function(ret){
                                alert(JSON.stringify(ret))
            });

		}


        function openNaXiangDateActivity(){
                    //调用选择器回调
                         var mYear = {
                                 shadowColor:0.2,
                                 startYear:2013,
                                 endYear:2020,
                                 startMonth:9,
                                 endMonth:1,
                                 startDay:1,
                                 endDay:1,
                                 maskswitch:false,
                                 isCycle:false,
                                 padding:1.5,
                                 textSize:18,
                                 titleSize:20,
                                 titleText:'时间选择器',
                                 cancel:'取消',
                                 sure:'确定',
                                 titlecolor:'#000000',
                                 submitcolor:'#1919FF',
                                 cancelcolor:'#1919FF',
                                 titlebgcolor:'#F5F5F5',
                                 bgcolor:'#FFFFFF',
                                 dividercolor:'#000000',
                                 textcolorcenter:'#000000',
                                 defaultYear:2018,
                                 defaultMoth:1,
                                 defaultDay:1,
                                 defaultHour:1,
                                 defaultMin:1,
                                 defaultSecond:1,
                                 showYear:true,
                                 showMoth:true,
                                 showDay:true,
                                 showHour:true,
                                 showMin:true,
                                 showSecond:true
                                }
                    PickerViewLib.openNaxiangDate(mYear,function(ret){
                        alert(JSON.stringify(ret.time)+JSON.stringify(ret.year));
             });

		}

        function openNaXiangSpinner(){
           var mItms = {
                mId:["1","2","3","4","5","6","7","8"],
                list:["android","php","java","html","数学","语文","英语","德语"],
                mHandTextColor: '#FF0000',
                mHandTextSize: 18,
                mHandTextIsGrivat:false,
                liftSize: 200,
                mWith: 150,
                topSize: 200,
                mBottomTextColor:'#FF0000',
                mBottomTextSize: 24,
                mLineHight:30,
                mHight: 30,
                mHtmlName: 'index_frm',
                mMove: true
             }
	        PickerViewLib.openItemSelect(mItms,function(ret){
                 alert(JSON.stringify(ret))
            });
		}

		function openNaXiangItems(){
              var mData = {
                    shadowColor:0.2,
                    maskswitch:false,
                    padding:1.5,
                    textSize:18,
                    mTitleSize:20,
                    titleText:'城市选择',
                    cancel:'取消',
                    sure:'确定',
                    titlecolor:'#000000',
                    submitcolor:'#1919FF',
                    cancelcolor:'#1919FF',
                    titlebgcolor:'#F5F5F5',
                    bgcolor:'#FFFFFF',
                    dividercolor:'#000000',
                    textcolorcenter:'#000000',
                    colnum:2,
                    oneItems:["android","php","java","html","数学","语文","英语","德语"],
                    oneItemsId:["1","2","3","4","5","6","7","8"],
                    twoItems:["赵","钱","孙","李","周","武","郑","网"],
                    twoItemsId:["1","2","3","4","5","6","7","8"],
                    threeItems:["妹子","萝莉","少太","把妹","大叔","神人","屌丝","太岁"],
                    threeItemsId:["1","2","3","4","5","6","7","8"]
                }

            PickerViewLib.openNaxiangItemSelect(mData,function(ret){
                                alert(JSON.stringify(ret))
                            });
		}

        function openPassworld(){

            var mData={
            maskswitch:false,
            passwordlength:6
            }
        PickerViewLib.openPassword(mData,function(ret){
                                alert(JSON.stringify(ret))
                            });
        }

        function closePassworld(){

         PickerViewLib.closePassword();

        }


    </script>
</head>
<body>
<div id="wrap">
    <div id="main">
        <br>
        <div class="clickbtn" tapmode="active" onclick="openNaXiangCityActivity()"><button>打开地址选择器选择器</button>
        </div>
        <br>
        <br>
        <br>
        <div class="clickbtn" tapmode="active" onclick="openNaXiangDateActivity()"><button>打开日期选择器</button>
        </div>
        <br>
        <br>
        <div class="clickbtn" tapmode="active" onclick="openNaXiangSpinner()"><button>打开选项条目选择器</button>
        </div>
        <br>
        <br>
        <div class="clickbtn" tapmode="active" onclick="openNaXiangItems()"><button>打开不联动条</button>
        </div>
        <br>
        <br>
        <div class="clickbtn" tapmode="active" onclick="openPassworld()"><button>显示密码输入框</button>
        </div>
        <br>
        <br>
        <div class="clickbtn" tapmode="active" onclick="closePassworld()"><button>隐藏密码输入框</button>
        </div>
        <br>
    </div>
</div>
</body>
</html>